*********************************************************************************
/*    Cumulative share of revenue collected each year 	*/
*********************************************************************************
clear all

* File paths
local datapath "${mvpf_audits}/data/cleaned" 
local datafolder "${mvpf_audits}/data/outside" 
local graphpath "${graphpath}" 
local dofilepath "${mvpf_audits}/code/prep" 


* Version of fig to produce 
global version ${version} // paper or slides

* Other formatting
if "${version}" == "slides" {
	global title "title(" ", size(vhuge))"
	global img wmf
	graph set window fontface "Arial"
	global title "title(" ", size(vhuge))"
	global axis_size "" //xsize(6.5) ysize(4)" // makes figure wider
}

else if "${version}" == "paper" {
	global title "title("")"
	global img pdf
	graph set window fontface "LMRoman10-Regular"
	global title " "
	global axis_size " " // makes figure wider
}

use "${mvpf_audits}/data/figures_rep/ap14.dta", clear

* plot the difference in taxes paid between audited and unaudited individuals
twoway  (scatter dd_avg_tax event_yr, mc(gs4) ms(O)) ///
		(line dd_avg_tax event_yr, lc(gs4)) ///
		, ///
		xline(-0.5, lw(vthin) lc(gs11)) ///
		yline(0, lw(vthin) lc(gs11)) ///
		xtitle("Year relative to tax year of audited return") ///
		ytitle("Taxes Paid") ///
		xlabel(-12(2)14 , nogrid)  ///
		ylab(, nogrid format(%9.0fc))  ///
		legend(off) ///
		${title} ${axis_size}	
graph export "`graphpath'/event_study_taxes_paid_ops.wmf", as(wmf) replace